const LOADING_TEXT = "正在加载中.."

function showToast(title) {
  if (title) {
    wx.showToast({
      title: title,
      icon: 'none',
    })
  }
}

function showLoading(title) {
  wx.showLoading({
    title: title ? title : LOADING_TEXT,
    mask: true,
  })
}

function hideLoading() {
  wx.hideLoading()
}


module.exports = {
  showToast: showToast,
  showLoading: showLoading,
  hideLoading: hideLoading,
}